﻿using huaxin_Impl;
using huaxin_Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace huaxin_luckdraw.Hubs
{
    public class OrderHubHelp
    {
        /// <summary>
        /// 根据订单号查询状态
        /// </summary>
        /// <param name="orderNo"></param>
        /// <returns></returns>
        public static object GetOrderResult(string orderNo)
        {
            huaxin_IPayOrder iPayOrder = new huaxin_PayOrderImpl();
            var order = iPayOrder.GetOrderIdByInfo(orderNo);
            if (order == null)
                return new  { msg="订单未处理",state=0 };

            if(order.PayStatus==1)
                return new {msg= "订单支付成功", state=order.PayStatus };
            else
                return new { msg = "订单未支付", state = order.PayStatus };
        }
    }
}